<!DOCTYPE html>
{% include "ic/head.html" with context %}
<body>
    <div id="spinner"></div>
    <div id="wrapper">
        <nav class="navbar navbar-default navbar-cls-top " role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                <div class="text-box" >
                </div>
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="/italiaCives"></a>
            </div>

  <div style="color: white; padding: 15px 0px 5px 5px;float: right; font-size: 16px;">{{pageData["ente_def"].denominazione}} &nbsp; </div>
        </nav>
           <!-- /. NAV TOP  -->
{% include "ic/sidebar-sx.html" with context %}
        <div id="page-wrapper" >
            <div id="page-inner">
                <section>
                <div class="tabs tabs-style-underline" >
                    <nav>
                        <ul>
                            <li >
                                <a style="color:#F87217;text-decoration:none;" href="/italiaCives/dashboard" class="fa fa-home fa-2x">
                                    <span>Home</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#31B0D5;text-decoration:none;" href="/italiaCives/news" class="fa fa-rss fa-2x">
                                    <span>News</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#449D44;text-decoration: none;" href="/italiaCives/news?tipo=eventi" class="fa fa-bullhorn fa-2x">
                                    <span>Eventi</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#C9302C;text-decoration:none;" href="/italiaCives/segnalazioni" class="fa fa-edit fa-2x">
                                    <span>Segnalazioni</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#5F5B59;text-decoration:none;" href="#comune" data-url="" class="fa fa-phone fa-2x">
                                    <span>Numeri Utili</span>
                                </a>
                            </li>
                            <li>
                                <a style="color:#0040FF;text-decoration:none;" href="#cambiacomune" data-url="/italiaCives/segnalazioni" class="fa fa-refresh fa-2x">
                                    <span>Cambia Comune</span>
                                </a>
                            </li>
                        </ul>
                    </nav>

                </div>
                </section>
{% block content %}
        <br />
<div class="infinite-container">
    {% for news in pageData['newss'] %}
        <div class="infinite-item">
        <div class="row">
            <div class="col-xs-12 col-md-12 col-lg-12 col-sm-12">
            {% if news.tipo == "eventi" %}
                <div class="panel panel-success">
                    <div class="panel-heading">
                            [{{news.tipo_news}}]<strong>{{news.title}}</strong>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-sm-12 col-lg-12">{{ news.body }}</div>
                         </div>
                    </div>
                    <div class="panel-footer">
                           Del: {{news.publication_date|datetimeformat}} <br />
                    </div>
                </div>
            {% elif news.tipo =="segnalazione" %}
                <div class="panel panel-danger">
                    <div class="panel-heading">
                        [{{news.tipo_segnalazione}}] <strong>{{news.denominazione}} ( #{{ news.numero }} )</strong>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-sm-12 col-lg-12"><b>Tipo:</b> {{ news.tipo_segnalazione }}</div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 col-lg-12"><b>Priorità:</b> {{ news.priorita_segnalazione }}</div>
                        </div>
                         <div class="row">
                            <div class="col-sm-12 col-lg-12"><b>Stato:</b> {{ news.stato_segnalazione }}</div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 col-lg-12"><b>Descrizione:</b> {{ news.descrizione }}</div>
                        </div>
                        <div class="row">
                            <div class="col-sm-12 col-lg-12">
    <!--
                                <a href="data:image/png;base64,{{news.immagine_thumb}}" rel="prettyPhoto" title="{{news.denominazione}}">
    -->
                            {% if news.immagine_thumb and news.immagine_thumb != "" %}
                            <img style='max-height: 90%; max-width: 90%' src="data:image/png;base64,{{news.immagine_thumb}}" data-src="data:image/png;base64,{{news.immagine_thumb}}" data-src-retina="data:image/png;base64,{{news.immagine_low}}" alt='{{news.denominazione}}' />
                            {% endif %}
    <!--
                            </a>
    -->
                            </div>
                        </div>
                    </div>
                    <div class="panel-footer">
                        {{news.data_inserimento|datetimeformat}}
                    </div>
                </div>
            {% else %}
                <div class="panel panel-info">
                    <div class="panel-heading">
                            [{{news.tipo_news}}]<strong>{{news.title}}</strong>
                    </div>
                    <div class="panel-body">
                        <div class="row">
                            <div class="col-sm-12 col-lg-12">{{ news.body }}</div>
                        </div>
                    </div>
                    <div class="panel-footer">
                                       Del: {{news.publication_date|datetimeformat}} <br />
                    </div>

                </div>
            {% endif %}

            </div>

            </div>
            </div>
    {% endfor %}
</div>
{% if pageData['page'] != 0 %}
    <a href="/italiaCives/dashboard_stream/{{pageData['page']}}" class="infinite-more-link"></a>
{% endif %}
{% endblock%}
            </div>
           <a href="#top" id="toTop"></a>
    {% include "ic/modal_cambio_ente.html" with context %}
    </div>
</div>
{% include "ic/scripts.html" with context %}
{% block custom_js %}

<script type="text/javascript">
$(document).ready(function(){
$('.infinite-container').waypoint('infinite');
$(window).trigger('resize');
$.waypoints('refresh');

});
</script>
{% endblock %}

</body>
</html>
